home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_exif.idb / usr / freeware / src / exif / patches.z / patches
Text File  |  2002-10-07  |  13KB  |  405 lines

  1. --- ./exif/main.c    Thu Jul 25 11:53:32 2002
  2. +++ ../exif-0.5/./exif/main.c    Tue Sep 24 11:53:00 2002
  3. @@ -20,6 +20,7 @@
  4.  
  5.  #include <config.h>
  6.  
  7. +#include <errno.h>
  8.  #include <stdlib.h>
  9.  #include <stdio.h>
  10.  #include <string.h>
  11. @@ -165,44 +166,42 @@
  12.  
  13.  typedef struct _ExifOptions ExifOptions;
  14.  struct _ExifOptions {
  15. -    unsigned char use_ids;
  16. -    ExifTag tag;
  17. +    unsigned int use_ids;
  18. +    ExifTag      tag;
  19.  };
  20.  
  21. +static ExifOptions   eo = {0, 0};
  22. +static unsigned int  extract_thumbnail = 0;
  23. +static const char   *ifd_string = NULL;
  24. +static const char   *ithumbnail = NULL;
  25. +static unsigned int  list_tags = 0;
  26. +static const char   *output = NULL;
  27. +static const char   *set_value = NULL;
  28. +static unsigned int  show_description = 0;
  29. +static const char   *tag_string = NULL;
  30. +
  31. +static struct poptOption options[] = {
  32. +POPT_AUTOHELP
  33. +{ "ids",               'i',  POPT_ARG_NONE,   &eo.use_ids,        0, N_("Show IDs instead of tag names"), NULL       },
  34. +{ "tag",               't',  POPT_ARG_STRING, &tag_string,        0, N_("Select tag"),                    N_("tag")  },
  35. +{ "ifd",               '\0', POPT_ARG_STRING, &ifd_string,        0, N_("Select IFD"),                    N_("IFD")  },
  36. +{ "list-tags",         'l',  POPT_ARG_NONE,   &list_tags,         0, N_("List all EXIF tags"),            NULL       },
  37. +{ "show-description",  's',  POPT_ARG_NONE,   &show_description,  0, N_("Show description of tag"),       NULL       },
  38. +{ "extract-thumbnail", 'e',  POPT_ARG_NONE,   &extract_thumbnail, 0, N_("Extract thumbnail"),             NULL       },
  39. +{ "insert-thumbnail",  'n',  POPT_ARG_STRING, &ithumbnail,        0, N_("Insert FILE as thumbnail"),      N_("FILE") },
  40. +{ "output",            'o',  POPT_ARG_STRING, &output,            0, N_("Write output to FILE"),          N_("FILE") },
  41. +{ "set-value",         '\0', POPT_ARG_STRING, &set_value,         0, N_("Value"),                         NULL       },
  42. +POPT_TABLEEND
  43. +};
  44. +
  45.  int
  46.  main (int argc, const char **argv)
  47.  {
  48.      /* POPT_ARG_NONE needs an int, not char! */
  49. -    unsigned int list_tags = 0, show_description = 0;
  50. -    unsigned int extract_thumbnail = 0;
  51. -    const char *set_value = NULL, *ifd_string = NULL, *tag_string = NULL;
  52.      ExifIfd ifd = -1;
  53.      ExifTag tag = 0;
  54. -    ExifOptions eo = {0, 0};
  55.      poptContext ctx;
  56. -    const char **args, *output = NULL;
  57. -    const char *ithumbnail = NULL;
  58. -    struct poptOption options[] = {
  59. -        POPT_AUTOHELP
  60. -        {"ids", 'i', POPT_ARG_NONE, &eo.use_ids, 0,
  61. -         N_("Show IDs instead of tag names"), NULL},
  62. -        {"tag", 't', POPT_ARG_STRING, &tag_string, 0,
  63. -         N_("Select tag"), N_("tag")},
  64. -        {"ifd", '\0', POPT_ARG_STRING, &ifd_string, 0,
  65. -         N_("Select IFD"), N_("IFD")},
  66. -        {"list-tags", 'l', POPT_ARG_NONE, &list_tags, 0,
  67. -         N_("List all EXIF tags"), NULL},
  68. -        {"show-description", 's', POPT_ARG_NONE, &show_description, 0,
  69. -         N_("Show description of tag"), NULL},
  70. -        {"extract-thumbnail", 'e', POPT_ARG_NONE, &extract_thumbnail, 0,
  71. -         N_("Extract thumbnail"), NULL},
  72. -        {"insert-thumbnail", 'n', POPT_ARG_STRING, &ithumbnail, 0,
  73. -         N_("Insert FILE as thumbnail"), N_("FILE")},
  74. -        {"output", 'o', POPT_ARG_STRING, &output, 0,
  75. -         N_("Write output to FILE"), N_("FILE")},
  76. -        {"set-value", '\0', POPT_ARG_STRING, &set_value, 0,
  77. -         N_("Value"), NULL},
  78. -        POPT_TABLEEND};
  79. +    const char **args;
  80.      ExifData *ed;
  81.      ExifEntry *e;
  82.      char fname[1024];
  83. @@ -317,9 +316,15 @@
  84.                  /* Save the thumbnail */
  85.                  f = fopen (fname, "wb");
  86.                  if (!f) {
  87. +#ifdef __GNUC__
  88.                      fprintf (stderr,
  89.                          _("Could not open '%s' for "
  90.                          "writing (%m)!"), fname);
  91. +#else
  92. +                    fprintf (stderr,
  93. +                        _("Could not open '%s' for "
  94. +                        "writing (%s)!"), fname, strerror(errno));
  95. +#endif
  96.                      fprintf (stderr, "\n");
  97.                      return (1);
  98.                  }
  99. @@ -340,8 +345,13 @@
  100.  
  101.                  f = fopen (ithumbnail, "rb");
  102.                  if (!f) {
  103. +#ifdef __GNUC__
  104.                      fprintf (stderr, _("Could not open "
  105.                          "'%s' (%m)!"), ithumbnail);
  106. +#else
  107. +                    fprintf (stderr, _("Could not open "
  108. +                        "'%s' (%s)!"), ithumbnail, strerror(errno));
  109. +#endif
  110.                      fprintf (stderr, "\n");
  111.                      return (1);
  112.                  }
  113. @@ -358,8 +368,13 @@
  114.                  fseek (f, 0, SEEK_SET);
  115.                  if (fread (ed->data, sizeof (char),
  116.                         ed->size, f) != ed->size) {
  117. +#ifdef __GNUC__
  118.                      fprintf (stderr, _("Could not read "
  119.                          "'%s' (%m)."), ithumbnail);
  120. +#else
  121. +                    fprintf (stderr, _("Could not read "
  122. +                        "'%s' (%s)."), ithumbnail, strerror(errno));
  123. +#endif
  124.                      fprintf (stderr, "\n");
  125.                      return (1);
  126.                  }
  127. --- ./exif/Makefile.in    Thu Jul 25 12:37:46 2002
  128. +++ ../exif-0.5/./exif/Makefile.in    Thu Oct  3 15:37:42 2002
  129. @@ -106,7 +106,7 @@
  130.  
  131.  exif_SOURCES =      actions.h actions.c        main.c                utils.h utils.c
  132.  
  133. -exif_LDADD =      ../libjpeg/libjpeg.la        -lpopt                $(LIBEXIF_LIBS)
  134. +exif_LDADD =      ../libjpeg/libjpeg.a        -lpopt                $(LIBEXIF_LIBS)
  135.  
  136.  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
  137.  CONFIG_HEADER = ../config.h
  138. @@ -118,9 +118,9 @@
  139.  DEFS = @DEFS@ -I. -I$(srcdir) -I..
  140.  CPPFLAGS = @CPPFLAGS@
  141.  LDFLAGS = @LDFLAGS@
  142. -LIBS = @LIBS@
  143. +LIBS = @LIBS@ $(INTLLIBS)
  144.  exif_OBJECTS =  actions.$(OBJEXT) main.$(OBJEXT) utils.$(OBJEXT)
  145. -exif_DEPENDENCIES =  ../libjpeg/libjpeg.la
  146. +exif_DEPENDENCIES =  ../libjpeg/libjpeg.a
  147.  exif_LDFLAGS = 
  148.  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  149.  LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  150. --- ./exif/actions.c    Thu Jul 25 08:45:13 2002
  151. +++ ../exif-0.5/./exif/actions.c    Tue Sep 24 11:53:00 2002
  152. @@ -62,7 +62,7 @@
  153.      printf ("%-38.38s", txt);
  154.      for (i = 0; i < EXIF_IFD_COUNT; i++)
  155.          printf ("%-7.7s", exif_ifd_get_name (i));
  156. -    printf ("\n");
  157. +    putchar ('\n');
  158.      for (tag = 0; tag < 0xffff; tag++) {
  159.          name = exif_tag_get_title (tag);
  160.          if (!name)
  161. @@ -73,7 +73,7 @@
  162.                  printf (ENTRY_FOUND);
  163.              else
  164.                  printf (ENTRY_NOT_FOUND);
  165. -        printf ("\n");
  166. +        putchar ('\n');
  167.      }
  168.  }
  169.  
  170. @@ -86,12 +86,12 @@
  171.          printf ("0x%04x", entry->tag);
  172.      else
  173.          printf ("%-20.20s", exif_tag_get_title (entry->tag));
  174. -    printf ("|");
  175. +    putchar ('|');
  176.      if (*ids)
  177. -        printf ("%-73.73s", exif_entry_get_value (entry));
  178. +        printf ("%-72.72s", exif_entry_get_value (entry));
  179.      else
  180. -        printf ("%-59.59s", exif_entry_get_value (entry));
  181. -    printf ("\n");
  182. +        printf ("%-58.58s", exif_entry_get_value (entry));
  183. +    putchar ('\n');
  184.  }
  185.  
  186.  static void
  187. @@ -107,11 +107,11 @@
  188.  
  189.          width = (ids ? 6 : 20); 
  190.          for (i = 0; i < width; i++)
  191. -                printf ("-");
  192. -        printf ("+");
  193. -        for (i = 0; i < 79 - width; i++)
  194. -                printf ("-");
  195. -        printf ("\n");
  196. +                putchar ('-');
  197. +        putchar ('+');
  198. +        for (i = 0; i < 78 - width; i++)
  199. +                putchar ('-');
  200. +        putchar ('\n');
  201.  }
  202.  
  203.  void
  204. @@ -125,18 +125,18 @@
  205.      order = exif_data_get_byte_order (ed);
  206.      printf (_("EXIF tags in '%s' ('%s' byte order):"), filename,
  207.          exif_byte_order_get_name (order));
  208. -    printf ("\n");
  209. +        putchar ('\n');
  210.      print_hline (ids);
  211.          if (ids)
  212.                  printf ("%-6.6s", _("Tag"));
  213.          else
  214.                  printf ("%-20.20s", _("Tag"));
  215. -        printf ("|");
  216. +        putchar ('|');
  217.          if (ids)
  218. -                printf ("%-73.73s", _("Value"));
  219. +                printf ("%-72.72s", _("Value"));
  220.          else
  221. -                printf ("%-59.59s", _("Value"));
  222. -        printf ("\n");
  223. +                printf ("%-58.58s", _("Value"));
  224. +        putchar ('\n');
  225.          print_hline (ids);
  226.      exif_data_foreach_content (ed, show_ifd, &ids);
  227.          print_hline (ids);
  228. @@ -143,6 +143,6 @@
  229.          if (ed->size) {
  230.                  printf (_("EXIF data contains a thumbnail (%i bytes)."),
  231.                          ed->size);
  232. -                printf ("\n");
  233. +                putchar ('\n');
  234.          }
  235.  }
  236. --- ./libjpeg/Makefile.in    Thu Jul 25 12:37:44 2002
  237. +++ ../exif-0.5/./libjpeg/Makefile.in    Thu Oct  3 15:35:52 2002
  238. @@ -102,14 +102,14 @@
  239.  INCLUDES =      -I$(top_srcdir)        $(LIBEXIF_CFLAGS)
  240.  
  241.  
  242. -noinst_LTLIBRARIES = libjpeg.la
  243. -libjpeg_la_SOURCES =      jpeg-data.c jpeg-data.h            jpeg-marker.c jpeg-marker.h
  244. +noinst_LIBRARIES = libjpeg.a
  245. +libjpeg_a_SOURCES =      jpeg-data.c jpeg-data.h            jpeg-marker.c jpeg-marker.h
  246.  
  247. -libjpeg_la_LIBADD = $(LIBEXIF_LIBS)
  248. +libjpeg_a_LIBADD = 
  249.  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
  250.  CONFIG_HEADER = ../config.h
  251.  CONFIG_CLEAN_FILES = 
  252. -LTLIBRARIES =  $(noinst_LTLIBRARIES)
  253. +LIBRARIES =  $(noinst_LIBRARIES)
  254.  
  255.  
  256.  DEFS = @DEFS@ -I. -I$(srcdir) -I..
  257. @@ -116,9 +116,9 @@
  258.  CPPFLAGS = @CPPFLAGS@
  259.  LDFLAGS = @LDFLAGS@
  260.  LIBS = @LIBS@
  261. -libjpeg_la_LDFLAGS = 
  262. -libjpeg_la_DEPENDENCIES = 
  263. -libjpeg_la_OBJECTS =  jpeg-data.lo jpeg-marker.lo
  264. +libjpeg_a_LDFLAGS = 
  265. +libjpeg_a_DEPENDENCIES = 
  266. +libjpeg_a_OBJECTS =  jpeg-data.o jpeg-marker.o
  267.  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  268.  LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  269.  CCLD = $(CC)
  270. @@ -130,8 +130,8 @@
  271.  
  272.  TAR = tar
  273.  GZIP_ENV = --best
  274. -SOURCES = $(libjpeg_la_SOURCES)
  275. -OBJECTS = $(libjpeg_la_OBJECTS)
  276. +SOURCES = $(libjpeg_a_SOURCES)
  277. +OBJECTS = $(libjpeg_a_OBJECTS)
  278.  
  279.  all: all-redirect
  280.  .SUFFIXES:
  281. @@ -144,14 +144,14 @@
  282.        && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
  283.  
  284.  
  285. -mostlyclean-noinstLTLIBRARIES:
  286. +mostlyclean-noinstLIBRARIES:
  287.  
  288. -clean-noinstLTLIBRARIES:
  289. -    -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
  290. +clean-noinstLIBRARIES:
  291. +    -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
  292.  
  293. -distclean-noinstLTLIBRARIES:
  294. +distclean-noinstLIBRARIES:
  295.  
  296. -maintainer-clean-noinstLTLIBRARIES:
  297. +maintainer-clean-noinstLIBRARIES:
  298.  
  299.  .c.o:
  300.      $(COMPILE) -c $<
  301. @@ -188,7 +188,7 @@
  302.      $(LIBTOOL) --mode=compile $(COMPILE) -c $<
  303.  
  304.  mostlyclean-libtool:
  305. -    -rm -f *.lo
  306. +    -rm -f *.lo *.o
  307.  
  308.  clean-libtool:
  309.      -rm -rf .libs _libs
  310. @@ -197,8 +197,8 @@
  311.  
  312.  maintainer-clean-libtool:
  313.  
  314. -libjpeg.la: $(libjpeg_la_OBJECTS) $(libjpeg_la_DEPENDENCIES)
  315. -    $(LINK)  $(libjpeg_la_LDFLAGS) $(libjpeg_la_OBJECTS) $(libjpeg_la_LIBADD) $(LIBS)
  316. +libjpeg.a: $(libjpeg_a_OBJECTS) $(libjpeg_a_DEPENDENCIES)
  317. +    $(LINK)  $(libjpeg_a_LDFLAGS) $(libjpeg_a_OBJECTS) $(libjpeg_a_LIBADD) $(LIBS)
  318.  
  319.  tags: TAGS
  320.  
  321. @@ -267,7 +267,7 @@
  322.  install: install-am
  323.  uninstall-am:
  324.  uninstall: uninstall-am
  325. -all-am: Makefile $(LTLIBRARIES)
  326. +all-am: Makefile $(LIBRARIES)
  327.  all-redirect: all-am
  328.  install-strip:
  329.      $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  330. @@ -283,18 +283,18 @@
  331.      -rm -f config.cache config.log stamp-h stamp-h[0-9]*
  332.  
  333.  maintainer-clean-generic:
  334. -mostlyclean-am:  mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
  335. +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  336.          mostlyclean-libtool mostlyclean-tags \
  337.          mostlyclean-generic
  338.  
  339.  mostlyclean: mostlyclean-am
  340.  
  341. -clean-am:  clean-noinstLTLIBRARIES clean-compile clean-libtool \
  342. +clean-am:  clean-noinstLIBRARIES clean-compile clean-libtool \
  343.          clean-tags clean-generic mostlyclean-am
  344.  
  345.  clean: clean-am
  346.  
  347. -distclean-am:  distclean-noinstLTLIBRARIES distclean-compile \
  348. +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  349.          distclean-libtool distclean-tags distclean-generic \
  350.          clean-am
  351.      -rm -f libtool
  352. @@ -301,7 +301,7 @@
  353.  
  354.  distclean: distclean-am
  355.  
  356. -maintainer-clean-am:  maintainer-clean-noinstLTLIBRARIES \
  357. +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  358.          maintainer-clean-compile maintainer-clean-libtool \
  359.          maintainer-clean-tags maintainer-clean-generic \
  360.          distclean-am
  361. @@ -310,8 +310,8 @@
  362.  
  363.  maintainer-clean: maintainer-clean-am
  364.  
  365. -.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
  366. -clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
  367. +.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  368. +clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  369.  mostlyclean-compile distclean-compile clean-compile \
  370.  maintainer-clean-compile mostlyclean-libtool distclean-libtool \
  371.  clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
  372. --- ./configure.in    Thu Jul 25 12:29:19 2002
  373. +++ ../exif-0.5/./configure.in    Tue Sep 24 11:53:00 2002
  374. @@ -19,7 +19,7 @@
  375.  AC_SUBST(LIBEXIF_LIBS)
  376.  AC_SUBST(LIBEXIF_CFLAGS)
  377.  
  378. -CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror"
  379. +#CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror"
  380.  AC_SUBST(CFLAGS)
  381.  
  382.  AC_OUTPUT([
  383. --- ./ltmain.sh    Tue Jul  2 13:12:16 2002
  384. +++ ../exif-0.5/./ltmain.sh    Tue Sep 24 11:53:48 2002
  385. @@ -61,7 +61,7 @@
  386.  default_mode=
  387.  help="Try \`$progname --help' for more information."
  388.  magic="%%%MAGIC variable%%%"
  389. -mkdir="mkdir"
  390. +mkdir="mkdir -p"
  391.  mv="mv -f"
  392.  rm="rm -f"
  393.  
  394. --- ./configure    Thu Jul 25 12:36:06 2002
  395. +++ ../exif-0.5/./configure    Thu Oct  3 15:48:42 2002
  396. @@ -9795,7 +9795,7 @@
  397.  
  398.  
  399.  
  400. -CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror"
  401. +#CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror"
  402.  
  403.  
  404.  ac_config_files="$ac_config_files Makefile libjpeg/Makefile exif/Makefile intl/Makefile po/Makefile.in"
  405.